package com.cxmx.escort.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 充值表
 * </p>
 *
 * @author 陈云轩
 * @since 2019-10-21
 */
@Data
@TableName("es_bed")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "充值表", description = "充值表")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Bed extends Model<Bed> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "业务员id")
    private String salesmanId;

    @ApiModelProperty(value = "所属医院id")
    private String hospitalId;

    @ApiModelProperty(value = "锁信号")
    private String bedSignal;

    @ApiModelProperty(value = "锁电量")
    private String bedElectricity;

    @ApiModelProperty(value = "锁的code码")
    private String bedCode;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间", readOnly = true)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "同步时间", readOnly = true)
    private LocalDateTime synchronousTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "修改时间", readOnly = true)
    private LocalDateTime updateTime;

    @TableLogic
    @ApiModelProperty(value = "删除标记", hidden = true)
    private Integer deleteFlag;
    private Integer faultFlag;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
